﻿#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <type_traits>
template<typename T>
constexpr T pi = T(3.1415926535897932385);
template< class T >
constexpr bool is_integral_v = std::is_integral<T>::value;
int main() {
	float f = pi<float>; // 单精度π
	double x = pi<double>; // 双精度π
	// 使⽤不同精度的π
	std::cout.precision(6);
	std::cout << "float π: " << f << std::endl;
	std::cout.precision(10);
	std::cout << "double π: " << x << std::endl;
	return 0;
}